package com.springboot.news.anno;

import com.springboot.news.validation.StatusValidetion;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {StatusValidetion.class})
public @interface Status {
//    校验失败后的提示
    String message() default "参数只能是草稿或者发布";
//    指定分组
    Class<?>[] groups() default {};
//负载 获取到state注解的附加信息
    Class<? extends Payload>[] payload() default {};
}
